/**
 * Copyright 2010 Victor Egea Hernando
 *
 * RockScript is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 * 
 * RockScript is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with RockScript.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef PAPER_TYPES_H_
#define PAPER_TYPES_H_

// used to import and export symbols to & from dlls on GCC and MVSC compilers
#if defined ( __WIN32__ ) || defined( _WIN32 ) || defined ( __CYGWIN__ )
    #if defined( __GNUC__ )
        #if defined( __PAPER_EXPORT__ )
            #define PAPER_API __attribute__((dllexport))
        #elif defined( __PAPER_IMPORT__ )
            #define PAPER_API __attribute__((dllimport))
        #else
            #define PAPER_API
        #endif  //__LIB_EXPORT__
		// calling convention
		#define CDECL __attribute__((cdecl))
    #else
        #if defined( __PAPER_EXPORT__ )
            #define PAPER_API __declspec(dllexport)
        #elif defined( __PAPER_IMPORT__ )
            #define PAPER_API __declspec(dllimport)
        #else
            #define PAPER_API
        #endif  //__LIB_EXPORT__
		// calling convention
		#define CDECL __cdecl
    #endif //__GNUC__
#else
    #if ( __GNUC__ >= 4 )
        #if defined( __PAPER_EXPORT__ )
            #define PAPER_API __attribute__ ((visibility("default")))
        #elif defined( __PAPER_IMPORT__ )
            #define PAPER_API __attribute__ ((visibility("default"))) 
        #else
            #define PAPER_API
        #endif  //__LIB_EXPORT__
    #else
        #define PAPER_API
    #endif
	// calling convention
	#define CDECL __attribute__((cdecl))
#endif

// The compiler must interpret an inline function as a macro
#define INLINE inline

#endif // PAPER_TYPES_H_
